<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Users
 *
 * This model represents user authentication data. It operates the following tables:
 * - user account data,
 * - user profiles
 *
 * @package	Tank_auth
 * @author	Ilya Konyukhov (http://konyukhov.com/soft/)
 */
class Enrollment extends CI_Model
{
	private $table_name			= 'workshop';			// payment table

	function __construct()
	{
		parent::__construct();

		$ci =& get_instance();
		$this->table_name			= $ci->config->item('db_table_prefix', 'tank_auth').$this->table_name;

	}

	/**
	 * Get user record by Id
	 *
	 * @param	int
	 * @param	bool
	 * @return	object
	 */
	
	
	function add_workshop($data)
	{

    $this->db->insert($this->table_name, $data);
	return NULL;
	}

	/**
	 * Activate user if activation key is valid.
	 * Can be called for not activated users only.
	 *
	 * @param	int
	 * @param	string
	 * @param	bool
	 * @return	bool
	 */
		function get_all_workshops()
	{
		$this->db->select('*');
		$this->db->from('workshop');
		$this->db->order_by('timeslotS', 'asc');
		
		$query = $this->db->get();
		return $query->result();
		
	}

	
}

